package com.itheima.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//用于标识当前类为REST风格对应的异常处理器
@RestControllerAdvice
public class ProjectExceptionAdvice {
    //统一处理所有的Exception异常
    @ExceptionHandler
    public Result exception(Exception e){
        return new Result(666,null);
    }
}
